import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;

public class demo02 {
    private static boolean isCompleteTree(TreeNode root){
        if(root == null) return true;
        Queue<TreeNode> queue = new LinkedList<>();
        queue.offer(root);
        while(!queue.isEmpty()){
            TreeNode node = queue.poll();
            if (node!=null){
                queue.offer(node.left);
                queue.offer(node.right);
            } else {
                break;
            }
        }
        while(!queue.isEmpty()){
            TreeNode cur = queue.poll();
            if(cur != null)return false;
        }
        return true;
    }
    public static void main(String[] args) {

    }
}
